home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Shared.Dir / 00993.ls < prev    next >
Encoding:
Text File  |  1997-11-20  |  876 b   |  33 lines

  1. on ProcAddWagon
  2.   global ListNum, givenList, randomized, wagonList, exitReward, NewCity, loc1Rew, Loc2Rew, Loc1Name, Loc2Name, curLoc
  3.   setAt(givenList, ListNum, 1)
  4.   if randomized = 0 then
  5.     set tot to 0
  6.     repeat with T = 1 to count(givenList)
  7.       if getAt(givenList, T) = 1 then
  8.         set tot to tot + 1
  9.       end if
  10.     end repeat
  11.     if tot = 1 then
  12.       set Loc1Name to getAt(NewCity, ListNum)
  13.       set loc1Rew to exitReward
  14.     else
  15.       if tot = 2 then
  16.         set Loc2Name to getAt(NewCity, ListNum)
  17.         set Loc2Rew to exitReward
  18.       end if
  19.     end if
  20.     if tot >= 2 then
  21.       set randomized to 1
  22.       RandomizeAfterTwo()
  23.     end if
  24.   end if
  25.   set temp to count(wagonList)
  26.   set temp to temp + 1
  27.   setAt(wagonList, temp, exitReward)
  28.   if randomized then
  29.     set tempNum to getOne(NewCity, curLoc)
  30.     setAt(rewardLocs, tempNum, EMPTY)
  31.   end if
  32. end
  33.